{template header.html}
<script type="text/javascript">
$(function() {
	SwapTab(0);
	{if $result}
	art.dialog.tips('{$result}', 3);
	{/if}
	{if $member_rule}
	$(".dr_select_all input").click(function(data){
		var _class = $(this).attr("class");
		if ($(this).attr('checked')) {
			$("."+_class).attr("checked",true);
		} else {
			$("."+_class).attr("checked",false);
		}
	});
	{/if}
	// 会员组权限联动
	$(".dr_select_all input").click(function(data){
		var _class = $(this).attr("class");
		if ($(this).attr('checked')) {
			$("."+_class).attr("checked",true);
		} else {
			$("."+_class).attr("checked",false);
		}
	});
     // 关闭搜索
    {if $data['setting']['search']['close']}dr_set_search(1);{/if}
});
function dr_set_search(v){
    if (v == 1) {
        $(".dr_search").hide();
    } else {
        $(".dr_search").show();
    }
}
function sitetips(_this) {
	var id = $(_this).attr("sid");
	if (!$(_this).attr("checked")) {
		art.dialog.confirm("<font color=red><b>{lang('html-152')}</b></font>", function(){
			$(".dr_site_"+id).hide();
			return true;
		}, function(){
			$(".dr_site_"+id).show();
			$(_this).attr("checked", "checked");
		});
	} else {
		$(".dr_site_"+id).show();
	}
}

function dr_admin_rule(id, url, title) {
	var throughBox = $.dialog.through; // 创建窗口
	var dr_Dialog = throughBox({title: title});
	// ajax调用窗口内容
	$.ajax({type: "GET", url:url, dataType:'text', success: function (text) {
			var win = $.dialog.top;
			dr_Dialog.content(text);
			// 添加按钮
			dr_Dialog.button({name: fc_lang[36], callback:function() {
					win.$("#mark").val("0"); // 标示可以提交表单
					if (win.dr_form_check()) { // 按钮返回验证表单函数
						var _data = win.$("#myform").serialize();
						$.ajax({type: "POST",dataType:"json", url: url, data: _data, // 将表单数据ajax提交验证
							success: function(data) {
								$("#dr_status_"+id).attr("class", "onCorrect");
								$("#dr_status_"+id).html("&nbsp;&nbsp;");
								$.dialog.tips(fc_lang[37], 2, 1);
								dr_Dialog.close();
							},
							error: function(HttpRequest, ajaxOptions, thrownError) {
								alert(HttpRequest.responseText);
							}
						});
					}
					return false;
				},
				focus: true
			});
	    },
	    error: function(HttpRequest, ajaxOptions, thrownError) {
			alert(HttpRequest.responseText);
		}
	});
}

function dr_set_flag(id) {
	art.dialog.open('{dr_url("module/flag")}', {
		title: '{lang("html-175")}',
		init: function () {
			var iframe = this.iframe.contentWindow;
			$(".dr_flag_"+id).each(function(){
				var iid = $(this).attr('iid');
				iframe.document.getElementById('top_dr_flag_'+iid).value = Math.abs($("#dr_flag_"+id+"_"+iid).val());
			});
		},
		ok: function () {
			var iframe = this.iframe.contentWindow;
			if (!iframe.document.body) {
				alert('iframe loading')
				return false;
			};
			$(".dr_flag_"+id).each(function(){
				var iid = $(this).attr('iid');
				$("#dr_flag_"+id+"_"+iid).val(iframe.document.getElementById('top_dr_flag_'+iid).value);
			});
			$("#dr_status_"+id).attr("class", "onCorrect");
			$("#dr_status_"+id).html("&nbsp;&nbsp;");
			return true;
		},
		cancel: true
	});
}
</script>
<form action="" method="post" name="myform" id="myform">
<input name="page" id="page" type="hidden" value="{$page}" />
<div class="subnav">
	<div class="content-menu ib-a blue line-x">
        {if $all}
		{$menu}
        {else}
        <a href="javascript:;" class="on"><em>{lang('061')}</em></a><span>|</span><a href="{dr_url('module/install3',array('id'=>$data.id, 'sid'=>SITE_ID, 'all'=>1))}"><em>{lang('361')}</em></a><span>|</span>
        {/if}
        <span>|</span><a href="{SYS_HELP_URL}83.html" target="_blank"><em>{lang('help')}</em></a>
	</div>
	<div class="bk10"></div>
	<div class="table-list col-tab">
		<ul class="tabBut cu-li">
			<li onclick="SwapTab(0)">{lang('html-083')}</li>
			<li onclick="SwapTab(1)">{lang('html-218')}</li>
			<li onclick="SwapTab(2)">{lang('html-174')}</li>
			<li onclick="SwapTab(3)">{lang('html-084')}</li>
			<li onclick="SwapTab(4)">{lang('html-327')}</li>
			<li onclick="SwapTab(5)">{lang('html-544')}</li>
			<li onclick="SwapTab(6)">{lang('html-828')}</li>
		</ul>
		<div class="contentList pad-10">
			<div id="cnt_0" style="display:none" class="dr_hide">
				<table width="100%" class="table_form">
				<tr>
					<th width="200">{lang('html-583')}： </th>
					<td>
						<input class="input-text" type="text" name="name" value="{$name}" size="11" />
                    </td>
				</tr>
				<tr>
					<th>{lang('html-697')}： </th>
					<td>
						<input type="radio" name="data[sitemap]" value="1" {if $data.sitemap}checked{/if} />&nbsp;<label>{lang('open')}</label>
                        &nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="data[sitemap]" value="0" {if !$data.sitemap}checked{/if} />&nbsp;<label>{lang('close')}</label>
						<div class="onShow">{lang('html-698')}</div>
                    </td>
				</tr>
                    <tr>
                        <th>{lang('html-741')}： </th>
                        <td>
                            <input type="radio" name="data[setting][postselect]" {if $data['setting']['postselect']}checked{/if} value="1" />&nbsp;<label>{lang('open')}</label>
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="radio" name="data[setting][postselect]" {if !$data['setting']['postselect']}checked{/if} value="0" />&nbsp;<label>{lang('close')}</label>
                            <div class="onShow">{lang('html-742')}</div>
                        </td>
                    </tr>
                    <tr>
                        <th>{lang('html-823')}： </th>
                        <td>
                            <input type="radio" name="data[setting][pcatpost]" {if $data['setting']['pcatpost']}checked{/if} value="1" />&nbsp;<label>{lang('open')}</label>
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="radio" name="data[setting][pcatpost]" {if !$data['setting']['pcatpost']}checked{/if} value="0" />&nbsp;<label>{lang('close')}</label>
                            <div class="onShow">{lang('html-824')}</div>
                        </td>
                    </tr>
                    <tr>
                        <th>{lang('html-106')}： </th>
                        <td>
                            <input type="radio" name="data[setting][bdping]" value="1" {if $data['setting']['bdping']}checked{/if} />&nbsp;<label>{lang('open')}</label>
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="radio" name="data[setting][bdping]" value="0" {if !$data['setting']['bdping']}checked{/if} />&nbsp;<label>{lang('close')}</label>
                            <div class="onShow">{lang('html-126')}</div>
                        </td>
                    </tr>
                    <tr>
                        <th>{lang('html-830')}： </th>
                        <td>
                            <input type="radio" name="data[setting][syncat]" value="1" {if $data['setting']['syncat']}checked{/if} />&nbsp;<label>{lang('open')}</label>
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="radio" name="data[setting][syncat]" value="0" {if !$data['setting']['syncat']}checked{/if} />&nbsp;<label>{lang('close')}</label>
                            <div class="onShow">{lang('html-831')}</div>
                        </td>
                    </tr>
				</table>
			</div>

            <div id="cnt_1" style="display:none" class="dr_hide">
				<table width="100%" class="table_form">
                <tr>
					<td align="left" width="100">&nbsp;</td>
					<td align="left" width="250">{lang('html-316')}&nbsp;</td>
					<td align="left" class="dr_select_all">
					<label>{lang('html-511')}</label>&nbsp;<input class="dr_use" type="checkbox" />
					</td>
				</tr>
				{list action=cache name=MEMBER.group return=group}
				{if $group.id > 2}
				<tr>
					<td align="left">&nbsp;</td>
					<td align="left">{$group.name}</td>
					<td align="left"></td>
				</tr>
				{loop $group.level $level}
				<tr>
					{php $id=$group['id'].'_'.$level['id'];}
					<td align="left">&nbsp;</td>
					<td align="left" style="padding-left:40px">{$level.name}&nbsp;&nbsp;{dr_show_stars($level.stars)}</td>
					<td align="left">
					<label>{lang('html-511')}</label>&nbsp;<input class="dr_use" name="data[setting][member][{$id}]" {if $data['setting']['member'][$id]}checked{/if} value=1 type="checkbox" />
					</td>
				</tr>
				{/loop}
				{else}
				<tr>
					{php $id=$group.id;}
					<td align="left" width="100">&nbsp;</td>
					<td align="left" width="250">{$group.name}</td>
					<td align="left">
					<label>{lang('html-511')}</label>&nbsp;<input class="dr_use" name="data[setting][member][{$id}]" {if $data['setting']['member'][$id]}checked{/if} value=1 type="checkbox" />
					</td>
				</tr>
				{/if}
				{/list}
				<tr>
                    <td> </td>
                    <td> </td>
                    <td><font color="gray">{lang('html-512')}</font></td>
                </tr>
				</table>
			</div>
			<div id="cnt_2" style="display:none" class="dr_hide">
				<table width="100%" class="table_form">
                {php for ($i = 1; $i <= 9; $i ++) {}
                <tr {if $i==9}class=""{/if}>
                    <th width="200">&nbsp;({$i})</th>
                    <td align="left">
                    <input class="input-text" name="data[setting][flag][{$i}][name]" type="text" value="{php echo isset($data['setting']['flag'][$i]['name']) ? $data['setting']['flag'][$i]['name'] : '';}" style="width:200px;"/>
                    {list action=cache name=MEMBER.group return=group}
					{if $group.id > 2}
                    	{loop $group.level $level}
							{php $iid=$group['id'].'_'.$level['id'];}
                            <input name="data[setting][flag][{$i}][{$iid}]" class="dr_flag_{$i}" iid="{$iid}" id="dr_flag_{$i}_{$iid}" type="hidden" value="{intval($data['setting']['flag'][$i][$iid])}" />
                        {/loop}
                    {/if}
                    {/list}
                    <a href="javascript:;" onclick="dr_set_flag('{$i}')" style="color:#06F">[{lang('html-175')}]</a>
					<div id="dr_status_{$i}" class="onShow"></div>
                    </td>
                </tr>
                {php }}
				</table>
			</div>
            <div id="cnt_3" style="display:none" class="dr_hide">
				<table width="100%" class="table_form">
                <tr>
					<th width="200">Title： </th>
					<td><input class="input-text" type="text" name="data[setting][seo][module_title]" value="{$data['setting']['seo']['module_title']}" size="80" />
					</td>
				</tr>
				<tr>
					<th>Keywords： </th>
					<td><input class="input-text" type="text" name="data[setting][seo][module_keywords]" value="{$data['setting']['seo']['module_keywords']}" size="80" />
					</td>
				</tr>
				<tr class="">
					<th>Description： </th>
					<td><input class="input-text" type="text" name="data[setting][seo][module_description]" value="{$data['setting']['seo']['module_description']}" size="80" />
					</td>
				</tr>
				</table>
			</div>
           	<div id="cnt_4" style="display:none" class="dr_hide">
				<table width="100%" class="table_form">
                <tr>
                    <th width="200">{lang('html-332')}： </th>
                    <td><input class="input-text" type="text" name="data[setting][tag][pagesize]" value="{$data['setting']['tag']['pagesize']}" size="10" />
                    <div class="onShow">{lang('html-333')}</div></td>
                </tr>
                <tr>
                    <th>{lang('html-328')}： </th>
                    <td><input class="input-text" type="text" name="data[setting][tag][url]" value="{$data['setting']['tag']['url']}" size="40" />
                    <div class="onShow">{lang('html-330')}</div></td>
                </tr>
                <tr class="">
                    <th>{lang('html-329')}： </th>
                    <td><input class="input-text" type="text" name="data[setting][tag][url_page]" value="{$data['setting']['tag']['url_page']}" size="40" />
                    <div class="onShow">{lang('html-331')}</div></td>
                </tr>
				</table>
			</div>
            <div id="cnt_6" style="display:none" class="dr_hide">
				<table width="100%" class="table_form">
                    <tr>
                        <th width="200">{lang('html-828')}： </th>
                        <td>
                            <input type="radio" name="data[setting][syn2]" value="1" {if $data['setting']['syn2']}checked{/if} />&nbsp;<label>{lang('open')}</label>
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="radio" name="data[setting][syn2]" value="0" {if !$data['setting']['syn2']}checked{/if} />&nbsp;<label>{lang('close')}</label>
                            <div class="onShow">{lang('html-829')}</div>
                        </td>
                    </tr>
                    <tr>
                        <th>{lang('html-834')}： </th>
                        <td>
                            <select name="data[setting][syn2field]">
                                <option value=""> -- </option>
                                {loop $field $t}
                                <option value="{$t.fieldname}" {if $data['setting']['syn2field'] == $t.fieldname}selected{/if}>{$t.name}</option>
                                {/loop}
                            </select>
                            <div class="onShow">{lang('html-835')}</div>
                        </td>
                    </tr>
                    <tr>
                        <th width="200">{lang('html-836')}： </th>
                        <td>
                            <input type="radio" name="data[setting][syn2tag]" value="1" {if $data['setting']['syn2tag']}checked{/if} />&nbsp;<label>{lang('open')}</label>
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="radio" name="data[setting][syn2tag]" value="0" {if !$data['setting']['syn2tag']}checked{/if} />&nbsp;<label>{lang('close')}</label>
                            <div class="onShow">{lang('html-837')}</div>
                        </td>
                    </tr>
                </table>
            </div>
            <div id="cnt_5" style="display:none" class="dr_hide">
				<table width="100%" class="table_form">
                <tr>
                    <th width="200">{lang('html-037')}： </th>
                    <td>
                        <input type="radio" name="data[setting][search][close]" {if $data['setting']['search']['close']}checked{/if} onclick="dr_set_search(1)" value="1" />&nbsp;<label>{lang('yes')}</label>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <input type="radio" name="data[setting][search][close]" {if !$data['setting']['search']['close']}checked{/if} onclick="dr_set_search(0)" value="0" />&nbsp;<label>{lang('no')}</label>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <div class="onShow">{lang('html-038')}</div>
                    </td>
                </tr>
                <tr class="dr_search">
                    <th>{lang('html-633')}： </th>
                    <td><input class="input-text" type="text" name="data[setting][search][total]" value="{if isset($data['setting']['search']['total'])}{$data['setting']['search']['total']}{else}500{/if}" size="10" />
                    <div class="onShow">{lang('html-634')}</div></td>
                </tr>
                <tr class="dr_search">
                    <th>{lang('html-546')}： </th>
                    <td><input class="input-text" type="text" name="data[setting][search][length]" value="{if $data['setting']['search']['length']}{$data['setting']['search']['length']}{else}4{/if}" size="10" />
                    <div class="onShow">{lang('html-548')}</div></td>
                </tr>
                <tr class="dr_search">
                    <th>{lang('html-328')}： </th>
                    <td>
					<input type="radio" name="data[setting][search][rewrite]" {if $data['setting']['search']['rewrite']}checked{/if} value="1" />&nbsp;<label>{lang('yes')}</label>
                    &nbsp;&nbsp;&nbsp;&nbsp;
					<input type="radio" name="data[setting][search][rewrite]" {if !$data['setting']['search']['rewrite']}checked{/if} value="0" />&nbsp;<label>{lang('no')}</label>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <div class="onShow">{lang('html-585')}</div>
					</td>
                </tr>
				</table>
			</div>
			<table width="100%" class="table_form">
			<tr>
				<th width="200" style="border:none;">&nbsp;</th>
				<td>
				<input class="button" type="submit" name="submit" value="{lang('submit')}" />
				</td>
			</tr>
			</table>
		</div>
	</div>
</div>
</form>
{template footer.html}